import { REG } from "@/data/locations";
import { StyleMgr } from "../libs/core/styleOperation";

const entry = (): boolean => {
  return StyleMgr.add(
    "commentEmojiScale",
    `
    .ubb-emotion {
        max-height: ${48 * 1.5}px !important;
      }
    `
  );
};

const module: ModulesConstructure = {
  name: "commentEmojiScale",
  type: "style",
  start: entry,
  optionUI: {
    enable: {
      type: "switch",
      department: "common",
      onActivate: () => {
        return true;
      },
      onDeactivate: () => {
        return false;
      },
    },
    scaleRatio: {
      type: "textbox",
      department: "common",
      onActivate: () => {
        return true;
      },
      onUpdated: (e) => {
        console.log("update to " + e);
      },
    },
  },
  condition: {
    siteMatch: [REG.article, REG.videoAndBangumi],
  },
};

export default module;
